package cz.matasek.dbLogger.database;

/**
 * List of database object types.
 *
 * @author Luboš Matásek
 */
public enum DatabaseObjectType {

    /**
     * Table.
     */
    TABLE,
    /**
     * Function.
     */
    FUNCTION,
    /**
     * Sequence
     */
    SEQUENCE,
    /**
     * Trigger.
     */
    TRIGGER,
    /**
     * Column.
     */
    COLUMN;

    /**
     * Returns string representation of the database object.
     * It means name with the first letter in uppercase.
     *
     * @return database object type
     */
    @Override
    public String toString() {
        return name().charAt(0) + name().substring(1).toLowerCase();
    }
}
